﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Reflection
{
    [ReviewComment("Check it out","2.4")]
    class Car
    {
        public string Color;

        public int Speed { get; set; }

        public void Accelerate(int accelerateBy)
        {
            Speed += accelerateBy;
        }

        public bool IsMoving()
        {
            if (Speed==0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }

        public Car()
        {
            Color = "White";
            Speed = 0;
        }

        public Car(string color, int speed)
        {
            Color = color;
            Speed = speed;
        }

        public double CalculateMpg(int startMiles, int endMiles, double gallons)
        {
            return (endMiles - startMiles)/gallons;
        }
    }
}
